var timeout = 60 * 120; //60 second

window.onload = function(){
	window.setInterval(timeOut,1000); //1 second
}

function timeOut(){
	timeout--;
	if(timeout <= 0){
		location.href = "logout.do";
		timeout = 60 * 120;
	}
}
